<template>
	<div class="container">
		<h3 style="margin-bottom:20px;">
			新增意见
		</h3>
		<span>
            <span>标题</span>
            <span><el-input v-model="input" placeholder="单行输入"></el-input></span>
        </span>
        <span>
            <span>反馈内容</span>
            <span><el-input v-model="input1" placeholder="请输入内容"></el-input></span>
            <!--<div ref="editor" style="width:90%"></div>-->
        </span>

        <el-button style="margin-top: 50px;" @click="opinionAdd">提交</el-button>
	</div>
</template>

<script>
    // import E from 'wangeditor';
	import { opinion_save, opinion_inquire } from "@/request/supervisionCenterApi.js"
	export default{
		data(){
			return{
				input: '',
                input1: '',
                productIntroduce:''
			}
		},
		mounted(){
			// var editor = new E(this.$refs.editor)
            // editor.create();
            // editor.txt.html(this.productIntroduce)
            this.init()
		},
		methods:{
            opinionAdd() {
                let data ={
                    word: {}
                }
                data.word.id = ''
                data.word.userId =JSON.parse(localStorage.getItem("userid"))
                data.word.companyId = localStorage.getItem("companyId")
                data.word.caption = this.input
                data.word.content = this.input1

                opinion_save(data).then((res) =>{
                    this.$notify({
					    title: '操作成功',
					    message: '反馈成功',
					    type: 'success'
					});
				    // this.$router.go(-1)
                })
            },
		}
	}
</script>

<style scoped>
	
</style>